# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年10月14日
"""
import pandas as pd

path = '../数据文件/课件028-029/Vlookup.xlsx'

data1 = pd.read_excel(path,sheet_name='花名册')
data2 = pd.read_excel(path,sheet_name='成绩单')

result = pd.merge(data1,data2.loc[:,['学号', '总分']],how='left', on='学号')
result_total = result['总分']
result = result.drop('总分', axis=1)

result.insert(0, '总分', result_total)

# print(data1)
# print(data2)
print(result)